//
//  CNLogMacro.h
//  CsdnPlus
//
//  Created by szh on 2020/6/9.
//  Copyright © 2020 CSDN. All rights reserved.
//

#ifndef CNLogMacro_h
#define CNLogMacro_h

#import <CocoaLumberjack/CocoaLumberjack.h>

static const DDLogLevel ddLogLevels = DDLogLevelAll;

#define LOG_FLAG_NETWORK_IMAGE_TIMER  (1 << 5) // 0...0100000
#define LOG_FLAG_NETWORK_TEXT_TIMER (1 << 6) // 0...1000000
#define LOG_FLAG_NETWORK_JSON_TIMER (1 << 7)

#define LOG_CONTEXT_NETWORK_IMAGE_TIMER 1
#define LOG_CONTEXT_NETWORK_TEXT_TIMER 2
#define LOG_CONTEXT_NETWORK_JSON_TIMER 3

#define DDLogNetWorkImage(frmt, ...)  LOG_MAYBE(YES, ddLogLevels, LOG_FLAG_NETWORK_IMAGE_TIMER,  LOG_CONTEXT_NETWORK_IMAGE_TIMER, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
#define DDLogNetWorkText(frmt, ...) LOG_MAYBE(YES, ddLogLevels, LOG_FLAG_NETWORK_TEXT_TIMER, LOG_CONTEXT_NETWORK_TEXT_TIMER, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)
#define DDLogNetWorkJson(frmt, ...) LOG_MAYBE(YES, ddLogLevels, LOG_FLAG_NETWORK_JSON_TIMER, LOG_CONTEXT_NETWORK_JSON_TIMER, nil, __PRETTY_FUNCTION__, frmt, ##__VA_ARGS__)



#endif /* CNLogMacro_h */
